import 'dart:convert';

import 'package:flutter_nb_net/flutter_net.dart';

class UnionPayOrderInfoResp extends BaseNetModel {
  int? code;
  String? msg;
  UnionPayOrderInfoData? data;

  UnionPayOrderInfoResp({this.data, this.code, this.msg});

  @override
  fromJson(Map<String, dynamic> json) {
    return UnionPayOrderInfoResp(
      data: json['data'] == null ? null : UnionPayOrderInfoData().fromJson(json['data']),
      code: json['code'],
      msg: json['msg'],
    );
  }
}

class UnionPayOrderInfoData extends BaseNetModel {
  String? body;
  String? orderNo;
  String? ticket;

  UnionPayOrderInfoData({this.body, this.orderNo, this.ticket});

  @override
  fromJson(Map<String, dynamic> json) {
    return UnionPayOrderInfoData(
      body: json['body'],
      orderNo: json['orderNo'],
      ticket: json['ticket'],
    );
  }

  /// 字符串转换为Map
  dynamic toJson(String? jsonStr) {
    return jsonStr == null ? null : json.decode(jsonStr);
  }
}